package de.openlaboratory.labhub.core.model;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@MappedSuperclass

public abstract class LabHubDataObject implements Serializable
{
	private static final long serialVersionUID = -3635739081211557790L;
	
	@Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(unique = true, nullable = false)
    private long id;
	private String name;
	private String namespace;
	private String title;
	private String description;
	
	private long created_by;
	private long changed_by;
	private long deleted_by;

	@Temporal(TemporalType.TIMESTAMP)
	private Date created_on;
	private Date changed_on;
	private Date deleted_on;

    public long getId()
    {
        return id;
    }
    
	public String getDescription()
	{
		return description;
	}
	
	public String getName()
	{
		return name;
	}

	public String getNamespace()
	{
		return namespace;
	}

	public String getTitle()
	{
		return title;
	}
	
	public void setNamespace(String namespace)
	{
		this.namespace = namespace;
	}
}